
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type RoutineSchemeRequest struct {

	Title string `json:"title" form:"title"`

	Path string `json:"path" form:"path"`

	Url string `json:"url" form:"url"`

	AddTime string `json:"add_time" form:"add_time"`

	ExpireType string `json:"expire_type" form:"expire_type"`

	ExpireInterval string `json:"expire_interval" form:"expire_interval"`

	ExpireTime string `json:"expire_time" form:"expire_time"`

	IsDel string `json:"is_del" form:"is_del"`

}

func (r *RoutineSchemeRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *RoutineSchemeRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"title": "required",

		"path": "required",

		"url": "required",

		"add_time": "required",

		"expire_type": "required",

		"expire_interval": "required",

		"expire_time": "required",

		"is_del": "required",

	}
}

func (r *RoutineSchemeRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *RoutineSchemeRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *RoutineSchemeRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
